<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>CMS后台管理平台-首页</title>
<link href="share/images/favicon.ico" rel="shortcut icon"/>
<link rel="stylesheet" type="text/css" href="resource/css/default/share.css"/>
<link rel="stylesheet" type="text/css" href="resource/css/default/index.css"/>
<link rel="stylesheet" type="text/css" href="resource/css/default/share.css"/>
<script src="resource/js/jquery-1.8.3.min.js" type="application/javascript"></script>
<script type="text/javascript" src="resource/share/js/jsUtil.js"></script>
<script src="resource/js/index.js" type="application/javascript"></script>
<link rel="stylesheet" href="resource/kindeditor-4.1.10/themes/default/default.css" />
<script charset="utf-8" src="resource/kindeditor-4.1.10/kindeditor-min.js"></script>
<script charset="utf-8" src="resource/kindeditor-4.1.10/lang/zh_CN.js"></script>
<script>
KindEditor.ready(function(K) {
    window.editor = K.create('#textarea',{
        cssPath:'/public/plugin/editor/plugins/code/prettify.css',
        uploadJson:'/upload/image.php',
        resizeType :1,
        allowPreviewEmoticons : true,
        allowImageUpload : true,
      });
});
</script>
</head>
<?php ?>
<body>
<div class="layer" style="width:100%; height:100%; position:absolute; z-index:1; opacity:0.3;filter: alpha(opacity=30);-moz-opacity: 0.3; -khtml-opacity: 0.3; background:#fff; display:none; text-align:center;">
    <ul style="width:300px; height:200px; margin:auto; margin-top:22%; z-index:2; text-align:center; line-height:200px; background:#03C; font-size:16px; color:#FFF; font-weight:bolder; "></ul>
</div>
<div class="bezel" id="bezel-id">
    <div class="head">
        <div class="hleft"><span class="head-icon">CMS管理平台</span></div>
        <div class="hcenter">
            <ul>
                <li class="on">站点管理</li>
                <li>内容管理</li>
                <li>业务管理</li>
                <li>系统管理</li>
            </ul>
        </div>
        <div class="hright">
            <span>管理员：<?php  echo $_SESSION['admin']['username'];?> 您好，欢迎登录使用！ <a class="outLogin" href="#">修改密码</a>　<a class="outLogin" href="javascript:void(0)" id="out">退出</a></span>
        </div>
    </div>
    <div class="center">
        <div class="cleft" id="cleft-id">   
            
            <?php  $xml = simplexml_load_file(MODEL_PATH.'list.xml'); foreach($xml->module as $value):?>
            <?php if(in_array($value->name->attributes()->id,$_SESSION['admin']['menu'])):?>
            <h4 <?php if($value->en == $_GET['c']){echo 'class="on"';};?>><?php echo "$value->name";?></h4>
            <ul <?php if($value->en == $_GET['c']){echo 'style="display: block;"';};?>>
            <?php foreach ($value->method as $val):?>
                <?php if($val->en!='edit' && $val->en!='delete'):?>
                <?php if(in_array($val->methodname->attributes()->id,$_SESSION['admin']['menu'])):?>
            <li <?php if($val->en == $_GET['a'] && $value->en == $_GET['c']){echo 'class="on"';};?>><a href="<?php echo $val->path;?>" ><?php echo $val->methodname;?></a></li>
            <?php endif;?>
            <?php endif;?>
            <?php endforeach;?>
            </ul>
        <?php endif;?>
            <?php endforeach;?>
        </div>
        <div class="rleft">
            <div class="position">　当前位置：深圳市　&gt;　罗湖区　&gt;　八卦岭</div>
            <div class="center">
                 <div class="topMenu">
                    <ul>
                    <li><a href="<?php echo 'index.php?admin=1&c='.$_GET['c'].'&a=add';?>" class="addhref">　新增　</a></li>
                    <li><a href="#">　发布　</a></li>
                    <li><a href="javascript:void(0)" class="del">　删除　</a></li>
                    <li><a href="#">　驳回　</a></li>
                    <li><a href="#">　置顶　</a></li>
                    <li><a href="#">　取消置顶　</a></li>
                    <li><a href="#">　推荐　</a></li>
                    <li><a href="#">　取消推荐　</a></li>
                    <li><a href="#">　复制　</a></li>
                    <li><a href="#">　转移　</a></li>
                    </ul>
                </div>
                <div class="search">
                <span>标题：<input type="text"/></span>
                <span>标题：<input type="text"/></span>
                <span>标题：<input type="text"/></span>
                <span>标题：<input type="text"/></span>
                <span><input type="button" id="search-btn" value="查询" /> </span>
                </div>
<script>
    $('#out').click(function(){
        $('.layer').show();
        var url='location="index.php?admin=1&c=admin&a=loginout"';
        setTimeout(url,3010);
        setTimeout("$('.layer ul').html('1秒后跳转登录页面')",2010);
        setTimeout("$('.layer ul').html('2秒后跳转登录页面')",1010);
        setTimeout("$('.layer ul').html('3秒后跳转登录页面')",10);
    })
</script>